<?php
	//定义常量
	define('VERSION', '0.0.1');
	defined('APP_PATH') OR define('APP_PATH', __DIR__.'/');
	define('ROUTE_PATH', APP_PATH.'App/');
	define('VIEW_PATH',ROUTE_PATH.'view/');
	define('JISHUWAN', APP_PATH.'jishuwan/');
	//加载配置文件
	$conf = require JISHUWAN.'conf/config.php';
	//加载方法文件
	require JISHUWAN.'hanlde/basic.php'; //基本函数
	require JISHUWAN.'hanlde/request.php';//请求函数
	require JISHUWAN.'hanlde/view.php';//视图方法pp
	$error_msg = []; //接收错误
	$root_path = handle_dir($conf['root_path']);
	$method = $_SERVER['REQUEST_METHOD'];
	$now_dir = get_now_path();
	$now_file = get_now_file();
	$now_path = param('path')?:$now_dir;
	//操作文件
	$route = param(0,'index');
	switch ($route) {
		case 'index':
			 include ROUTE_PATH.'index.php';
			break;
		case 'file':
			 include ROUTE_PATH.'file.php';
			break;
		case 'dir':
			 include ROUTE_PATH.'dir.php';
			break;
		default:
			echo "404!";
			break;
	}